-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(java/python): new xlang type system spec implementation #1690
Conversation
## What does this PR do? This PR moves `org.apache.fury.reflect.Types` into TypeRef. Types is used in Fury type system, by merge `org.apache.fury.reflect.Types`, we can reduce ambiguation in fury type system ## Related issues #1553 #1690 ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fury/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. -->
86a35c3
to
a3d4d9d
Compare
Hi @theweipeng @pandalee99 @penguin-wwy @PragmaTwice @jiacai2050 , this PR is ready for review, could you help review it? |
java/fury-core/src/main/java/org/apache/fury/resolver/XtypeResolver.java
Show resolved
Hide resolved
java/fury-core/src/main/java/org/apache/fury/resolver/XtypeResolver.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is basically okay.
It supports new types and improves the specifications of the type system. For instance, the XtypeResolver
class has established a rather intricate yet fully functional mechanism for type resolution, registration, and the processing of related information.This PR has added a lot of functions and optimized the performance.
…n in pyfury (#2034) ## What does this PR do? This pr unifies type system between python and xlang serialization in pyfury, so that we can remove duplicate code in pyfury, and lay the foundation for following features: - [ ] implement protocol such as chunk based map serialization for pythobn and xlang serialization - [ ] use python exsiting fastpath optimization in xlang serialization - [ ] extend `DataClassSerializer` to support codegen based serialization for xlang ## Related issues #1690 ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fury/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. -->
What does this PR do?
This PR implements a new type system for xlang serialization between java and python.
The changes includes:
List<SomeClass>
, we can save dynamic serializer dispatch ifSomeClass
is morphic(final).struct
whose type mapping will be encoded as a name.polymorphic_struct
whose type mapping will be encoded as a name.compatible_struct
whose type mapping will be encoded as a name.polymorphic_compatible_struct
whose type mapping will be encoded as a name.ext
type which is not morphic(not final).ext
type whose type mapping will be encoded as a name.polymorphic_ext
type whose type mapping will be encoded as a name.ArrayList/Object[]
in java. Users canserialize(List.of(1, 2, ,3))
and deserialize it into array bydeserialize(bytes, Integer[].class)
Related issues
Does this PR introduce any user-facing change?
Benchmark